require("../../components/wux");

var e = getApp();

Page({
    data: {
        currentTab: 0,
        clickType: 0,
        clickSquareType: 0,
        roles: "",
        recommandRoleIndex: 0,
        sqaureRoleIndex: 0,
        first: !0,
        provinceIndex: 0,
        provinces: [],
        roleIndex: 0,
        roleNames: [],
        roleValues: [],
        pageNo: 1,
        total: -1,
        listDatas: [],
        sendOrderId: 0,
        isLoading: !1,
        price: ""
    },
    clickCommand: function(e) {
        this.setData({
            currentTab: 0
        });
    },
    clickSquare: function(e) {
        this.setData({
            currentTab: 1
        });
    },
    clickCollection: function(e) {
        2 != this.data.currentTab ? wx.navigateTo({
            url: "dynamicCollection/dynamicCollection"
        }) : wx.navigateTo({
            url: "../me/myOrder/myOrder"
        });
    },
    clickSearch: function(e) {
        wx.navigateTo({
            url: "/pages/searchSchedule/search/search"
        });
    },
    clickType: function(e) {
        var a = e.currentTarget.dataset.type;
        this.setData({
            clickType: a
        });
    },
    changeRecommandRole: function(e) {
        var a = e.detail.value;
        if (a != this.data.recommandRoleIndex) {
            var t = this.data.clickType;
            5 == this.data.recommandRoleIndex && 3 == t && (t = 0), this.setData({
                recommandRoleIndex: a,
                clickType: t
            });
        }
    },
    changeSquareRole: function(e) {
        var a = e.detail.value;
        a != this.data.sqaureRoleIndex && this.setData({
            sqaureRoleIndex: a
        });
    },
    clickSquareType: function(e) {
        var a = e.currentTarget.dataset.type;
        this.setData({
            clickSquareType: a
        });
    },
    swiperChange: function(e) {
        this.setData({
            currentTab: e.detail.current
        });
    },
    onMyEvent: function(e) {
        wx.hideNavigationBarLoading(), this.setData({
            loadMore: !1
        });
    },
    onLoad: function(a) {
        var t = [ "全部", "视频", "图文", "图片", "策划", "主持", "化妆", "摄像", "摄影", "督导", "花艺", "灯光", "场布", "车队", "设计", "婚纱", "歌手", "乐器", "舞蹈", "杂技", "魔术", "演员", "音响师", "喜娘", "大屏" ];
        this.setData({
            roles: t
        });
        var n = wx.getStorageSync(e.storage.myPrice), o = this;
        setTimeout(function() {
            o.setData({
                first: !1,
                price: n
            });
        }, 1e3), this.setData({
            provinces: e.globalData.provinces,
            roleNames: e.globalData.roleNames,
            roleValues: e.globalData.roleValues
        });
    },
    onReady: function() {},
    onShow: function() {
        e.globalData.currentTab = "/pages/hysquare/hysquare", wx.showTabBar({});
    },
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {
        var a = e.util.getShareInfo();
        return {
            title: e.globalData.commonShareTitle,
            path: a[0],
            imageUrl: a[1],
            success: function(e) {},
            fail: function(e) {}
        };
    }
});